-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
MAINT Use list and dict comprehension #23894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fixes, thanks for taking care of them.
Just added a comment that IMO would improve readability, but lgtm.
pandas/io/formats/printing.py
Outdated
# handle sets, no slicing | ||
r = [ | ||
pprint_thing( | ||
next(s), _nest_lvl + 1, max_seq_items=max_seq_items, **kwds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally I think it'd be a bit more readable like:
r = [pprint_thing(next(s),
_nest_lvl + 1,
...
Codecov Report
@@ Coverage Diff @@
## master #23894 +/- ##
==========================================
- Coverage 92.31% 92.3% -0.01%
==========================================
Files 161 161
Lines 51471 51431 -40
==========================================
- Hits 47515 47475 -40
Misses 3956 3956
Continue to review full report at Codecov.
|
can you merge master, ping on green. |
Hello @rth! Thanks for updating the PR.
|
Thanks @datapythonista ! Addressed your comment. @jreback Merged master in and CI is green. |
thanks @rth |
This uses list and dict comprehension in places where it doesn't hurt readability. It should be a bit faster and less verbose.